package {
	import nl.ypmits.utils.as3.GeneralSetup;
	import nl.ypmits.utils.as3.date.clock.Clock;
	import nl.ypmits.utils.as3.date.clock.ClockSkin;
	import nl.ypmits.utils.as3.date.clock.type.ClockType;

	import flash.display.Sprite;

	/**
	 * @author Dave Lenz
	 */
	public class ClockTest extends Sprite {

		public function ClockTest() {
			
			GeneralSetup.instance.init( stage, "TL", "noScale", true, 900, 700, true, null, true );
			
			// graphics
			var uur : Sprite = new Sprite();
			uur.graphics.lineStyle( 3, 0x666666, 1 );
			uur.graphics.moveTo(0, 0);
			uur.graphics.lineTo(70, 0);
			
			var minuten : Sprite = new Sprite();
			minuten.graphics.lineStyle( 2, 0x666666, 1 );
			minuten.graphics.moveTo(0, 0);
			minuten.graphics.lineTo(100, 0);
			
			var seconden : Sprite = new Sprite();
			seconden.graphics.lineStyle( 1, 0x666666, 1 );
			seconden.graphics.moveTo(0, 0);
			seconden.graphics.lineTo(110, 0);
			
			// SKINS
			var analogueSkin : ClockSkin = new ClockSkin();
			analogueSkin.hourGraphic = uur;
			analogueSkin.minutesGraphic = minuten;
			analogueSkin.secondsGraphic = seconden;
			
			var digitalSkin : ClockSkin = new ClockSkin();
			digitalSkin.fontName = "";
			
			var analogueClock : Clock = new Clock( ClockType.ANALOGUE, analogueSkin );
			analogueClock.x = 200;
			analogueClock.y = 200;
			addChild( analogueClock );
			analogueClock.start();
			
			var digitalClock : Clock = new Clock( ClockType.DIGITAL, digitalSkin );
			digitalClock.x = 200;
			digitalClock.y = 200;
			addChild( digitalClock );
			digitalClock.scaleX = digitalClock.scaleY = 4;
			digitalClock.start();
		}
	}
}
